package org.jeecg.modules.xl.store.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @Description: 客户门店信息
 * @Author: jeecg-boot
 * @Date:   2024-10-24
 * @Version: V1.0
 */
@ApiModel(value="xl_customer_store_info对象", description="客户门店信息")
@Data
@TableName("xl_customer_store_info")
public class XlCustomerStoreInfo implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private String id;
	/**门店编码*/
	@Excel(name = "门店编码", width = 15)
    @ApiModelProperty(value = "门店编码")
    private String storeCode;
	/**门店名称*/
	@Excel(name = "门店名称", width = 25)
    @ApiModelProperty(value = "门店名称")
    private String storeName;
	/**门店类型：直营，加盟*/
	@Excel(name = "门店类型：直营，加盟", width = 20)
    @ApiModelProperty(value = "门店类型：直营，加盟")
    private String storeType;
    /**渠道编码*/
    @Excel(name = "渠道类型编码", width = 15)
    @ApiModelProperty(value = "渠道类型编码")
    private String customerTypeCode;

    /**渠道编码*/
    @Excel(name = "渠道类型描述", width = 15)
    @ApiModelProperty(value = "渠道类型描述")
    private String customerType;

	/**门店等级：一批，二批，三批*/
	@Excel(name = "门店等级：一批，二批，三批", width = 15, dicCode = "xlcustomerlevel")
    @Dict(dicCode = "xlcustomerlevel")
    @ApiModelProperty(value = "门店等级：一批，二批，三批")
    private String storeLevel;
	/**客户ID*/
	//@Excel(name = "客户ID", width = 15, dictTable = "xl_customer_info", dicText = "customer_name", dicCode = "id")
    //@Dict(dictTable = "xl_customer_info", dicText = "customer_name", dicCode = "id")
//    @ApiModelProperty(value = "客户ID")
//    private Integer customerId;
	/**省市区 来自 快递100的接口  智能地址解析 https://api.kuaidi100.com/document/dizhijiexi02 */
    @Excel(name = "省", width = 25,exportConvert=true,importConvert = true )
    @ApiModelProperty(value = "")
    private String province;
    @Excel(name = "市", width = 25,exportConvert=true,importConvert = true )
    @ApiModelProperty(value = "市")
    private String city;
    @Excel(name = "区县", width = 25,exportConvert=true,importConvert = true )
    @ApiModelProperty(value = "区县")
    private String district;


    @ApiModelProperty(value = "行政区划编码")
    private String code;


    public String convertisProvince() {
        return SpringContextUtils.getBean(ProvinceCityArea.class).getText(province);
    }

    public void convertsetProvince(String text) {
        this.province = SpringContextUtils.getBean(ProvinceCityArea.class).getCode(text);
    }
	/**门店系统地址*/
	@Excel(name = "门店详细地址", width = 45)
    @ApiModelProperty(value = "门店详细地址")
    private String storeAddress;
	/**门店地址经纬度*/
	//@Excel(name = "门店地址经纬度", width = 15)
    @ApiModelProperty(value = "门店地址经纬度")
    private String storeCoordinates;
	/**门店面积*/
	//@Excel(name = "门店面积", width = 15)
    @ApiModelProperty(value = "门店面积")
    private String storeArea;
	/**门店负责人id*/
    @ApiModelProperty(value = "门店负责人id")
    private String storeManagerId;
	/**门店负责人*/
	@Excel(name = "门店负责人", width = 25)
    @ApiModelProperty(value = "门店负责人")
    private String storeManager;
	/**门店负责人电话*/
	@Excel(name = "门店负责人电话", width = 15)
    @ApiModelProperty(value = "门店负责人电话")
    private String storeManagerPhone;


    /**发货方式(1:城配，2:快递)*/
    //@Excel(name = "发货方式", width = 15, dicCode = "delivery_way")
    @Dict(dicCode = "delivery_way")
    @ApiModelProperty(value = "发货方式(1:城配，2:快递)")
    private String deliveryWay;
    /**快递类型(1:三通一达，2:顺丰，3:京东，4:极兔，5:邮政，6:德邦)*/
   // @Excel(name = "快递类型", width = 15, dicCode = "delivery_type")
    @Dict(dicCode = "delivery_type")
    @ApiModelProperty(value = "快递类型(1:三通一达，2:顺丰，3:京东，4:极兔，5:邮政，6:德邦)")
    private String deliveryType;
    //'机器人绑定群'
    private String    wxbotGroupWxid;
    // '机器人@人员,多个逗号分割'
    private String     wxbotAtWxid;
	/**租户号*/
    @ApiModelProperty(value = "租户号")
    private String tenantId;
	/**是否删除标志*/
    @ApiModelProperty(value = "是否删除标志")
    @TableLogic
    private Integer isDeleted;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
}
